import { api } from '../api';

// 获取章节数据的 API
export const getPracticeSections = async (practiceId: string) => {
  try {
    const response = await api.get(`/java/ground/study/practice/book/${practiceId}`);
    return response.data; // 返回响应数据
  }
  catch (error) {
    console.error('加载章节数据时出错:', error);
    throw error; // 让调用方处理错误
  }
};
